<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>酒店订单</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/common/style/base.css" type="text/css" media="screen" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/common/style/page.css" type="text/css" media="screen" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/common/src/css/jscal2.css" type="text/css" media="screen" />
<script src="${pageContext.request.contextPath}/common/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/common/js/common.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/common/src/js/jscal2.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/common/src/js/lang/cn.js" type="text/javascript"></script>

</head>
<body>
<div id="main_frame">	
<div id="pagemenu">
	<a href="hotelOrder!getHotelOrderListByPage.action" title="订单列表"  >订单列表</a>
	|<a href="javascript:void(0);"  class="selected" title="审核">审核</a>

</div>
	
	<div class="listbox">	
	<table class="listtab"  align="center">
		<thead>
			<tr>
				<th width="42"><span class="mline"><input type="checkbox" name="checkbox" id="checkbox" onclick="selectall(this);" /></span></th>
				<th width="160"><span class="mline">订单号</span></th>
				<th width="100"><span class="mline">客户名称</span></th>
				<th width="100"><span class="mline">房型名称</span></th>
				<th width="80"><span class="mline">总金额</span></th>
				<th width="160"><span class="mline">下单时间</span></th>
				<th width="120"><span class="mline">入住时间</span></th>
				<th><span class="mline">状态</span></th>
				<th width="260">管理操作</th>
			</tr>
		</thead>
		<tbody>			
		<s:iterator value="hotelOrderList" id="hotelOrder" var="x">
			<tr>				
				<td><input type="checkbox" name="checkbox" value="${x.id}" class="ckbox"/></td>
				<td><a href="findInfoById.action?id=${x.id}" title="订单详情">${x.code}</a></td>
				<td><a href="${pageContext.request.contextPath}/panel/member/findInfoById.action?id=${x.memberId} ">${x.customerName}</a></td>
				<td><a href="../roomStyle/findInfoById.action?id=${x.roomStyleId}">${x.roomName}</a></td>
				<td>${x.totalMoney}元</td>
				<td><s:date name="#x.orderTime" format="yyyy-MM-dd HH:mm:ss"/></td>
				<td><s:date name="#x.checkinTime" format="yyyy-MM-dd"/></td>
				<td>
					<s:if test="#x.tradeStatus==1">
					<font color="red">未付款</font>
					</s:if>
					<s:if test="#x.tradeStatus==2">
					<font color="green">已付款</font>
					</s:if>
					<s:if test="#x.tradeStatus==3">
					<font color="green">已入住</font>
					</s:if>
					<s:if test="#x.tradeStatus==4">
					<font color="green">已结束</font>
					</s:if>
					<s:if test="#x.tradeStatus==5">
					<font color="green">已取消</font>
					</s:if>
				</td>
				<td>
					<a href="findInfoById.action?id=${x.id}"  class="abg">编辑</a>
					<a href="ispass.action?ids=${x.id}"  class="abg" onclick="return ispass_confirm();">审核</a>
					<a href="updateState.action?id=${x.id}&state=5" onclick="return oconfirm();" class="abg">取消</a>
					<script>
						function oconfirm(){
							if(confirm("确定取消吗"))return true;
							else return false;
						}
					</script>
				</td>
			</tr>
		</s:iterator>
		</tbody>
	</table>
</div>
</div>
<div id="bottombar">
	<div class="fl"><span><a onclick="selectall(true);" href="javascript:void(0);">全选</a>/<a onclick="selectall(false);" href="javascript:void(0);">取消</a></span>
	<a href="javascript:void(0);" onclick="ispass('ispass.action');"  title="审核" class="addsource" onclick="return ispass_confirm();">审核</a><a href="javascript:location=location;"  class="addsource">刷新</a></div>
	<div class="fr listpage">${pagination}</div>
</div>
</body>
</html>